package com.css.fxfzmhwz.config.property;


import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author fanjidong
 * @Title: PlatFormConfig
 * @date 2020/4/2115:45
 */
@Component
@PropertySource(factory = YamlPropertySourceFactory.class,value = "classpath:fxfz-config.yml")
@Data
public class FxfzConfig {
    @Value("${cache.isEnable:false}")
    private Boolean isCacheEnable;
    @Value("${login.isCaptcha:false}")
    private Boolean isCaptcha;
    @Value("${login.url:core/fxfzmhwz/page/login/login}")
    private String loginUrl;
    @Value("${login.pwdRule:unlimited}")
    private String pwdRule;
    @Value("${login.pwdLength:6}")
    private String pwdLength;
    @Value("${login.isModify:0}")
    private String isModify;
    @Value("${login.defaultPwd:Fxpc@13579#}")
    private String defaultPwd;
    @Value("${login.pwdExpired:}")
    private Integer pwdExpired;
    @Value("${login.tooManyFailures:5}")
    private Integer tooManyFailures;
    @Value("${login.lockedTime:2}")
    private Integer lockedTime;
    @Value("${login.encryption:md5}")
    private String encryption;
    @Value("${filter.sessionFilter.urlPatterns:/fxfzmhwz/*}")
    private String[]  sessionUrlPatterns;
    @Value("${filter.sessionFilter.ignoreUrlPatterns:/fxfzmhwz/login.*,/fxfzmhwz/captcha,/fxfzmhwz/page,/fxfzmhwz/api.*,/fxfzmhwz/pwdconfig,/fxfzmhwz/certification,/fxfzmhwz/test.*}")
    private String sessionIgnoreUrlPatterns;
    @Value("${filter.sessionFilter.order:100}")
    private Integer sessionFilterOrder;
    @Value("${interceptor.apiInterceptor.addPath:/fxfzmhwz/api/**}")
    private String[] apiAddPath;
    @Value("${interceptor.apiInterceptor.excludePath:**/loginauth,/fxfzmhwz/test/*}")
    private String[] apiExcludePath;
    @Value("${jwt.expireTime:1800000}")
    private long expireTime;

    @Value("${corsIp:0.0.0.0}")
    private String corsIp;
}
